﻿/**
 * 
 * @file CentralWidget.h
 * @brief 中心窗口声明
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-09-24
 * 
 */
#ifndef _CENTRAL_Widget_H__
#define _CENTRAL_Widget_H__

#include "GUIFrameAPI.h"
#include <QWidget>

namespace Ui
{
    class CentralWidget;
}
namespace Comp
{
    class FITKMdiArea;
}

namespace GUI
{
    class ControlPanel;
    class GraphArea;
    /**
     * @brief 中心窗口，核心是 MDI 容器
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-09-24
     */
    class GUIFRAMEAPI CentralWidget : public QWidget
    {
        Q_OBJECT;
    public:
        /**
         * @brief Construct a new Central Widget object
         * @param[i]  parent         父对象
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-09-24
         */
        explicit CentralWidget(QWidget* parent);
        /**
         * @brief Destroy the Central Widget object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-09-24
         */
        virtual ~CentralWidget();
        /**
         * @brief 获取控制面板
         * @return ControlPanel* 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-15
         */
        ControlPanel* getControlPanel();
        /**
         * @brief 获取绘图区域
         * @return GraphArea* 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-15
         */
        GraphArea* getGraphArea();

    private:
        /**
         * @brief UI对象
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-09-24
         */
        Ui::CentralWidget* _ui{};
        /**
         * @brief 控制面板
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-15
         */
        ControlPanel* _controlPanel{};
        /**
         * @brief 绘图区域
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-15
         */
        GraphArea* _graphArea{};
    };
}

#endif
